#include<cstdio>
#include<cstring>
const int maxn=10010;
const long long INF=0xffffffffff;
int n,s,l,r;
int f[maxn],t[maxn],fa[maxn],q[maxn];
int min(int x,int y){return x<y?x:y;}
bool judge(int k,int j,int i)
{
	if((f[k]-f[j])<(t[k]-t[j])*fa[i])return true;
	return false;
}
bool check(int i,int k,int j)
{
	if((f[i]-f[k])*(t[k]-t[j])<(f[k]-f[j])*(t[i]-t[k]))return true;
	return false;
}
int main()
{

	while(~scanf("%d%d",&n,&s)){
	for(int i=1;i<=n;i++)
		scanf("%d%d",&t[i],&fa[i]);
	t[n+1]=f[n+1]=0;
	for(int i=n;i>=1;i--)
	{
		t[i]+=t[i+1];
		fa[i]+=fa[i+1];
	}
	memset(q,0,sizeof(q));
	memset(f,0,sizeof(f));
	l=r=0;
	f[n]=(s+t[n])*fa[n];
	for(int i=n;i>=1;i--)
	{
		while(l<r&&judge(q[l+1],q[l],i))l++;
		if(i<n)f[i]=f[q[l]]+(t[i]-t[q[l]]+s)*fa[i];
		while(l<r&&check(i,q[r],q[r-1]))r--;
		r++;q[r]=i;
	}	
	printf("%d\n",f[1]);}
	return 0;
}
